package wish

class Wish {

	List wihItems
	
	static hasMany		= [wishItems: WishItem]	
	
    static mapping = {
    }
    
	static constraints = {
    }
	
	public BigDecimal getCost(){
		BigDecimal cost = 0
		wishItems.each{
			cost += it.cost
		}
		return cost
	}
	
	public BigDecimal getPrice(){
		BigDecimal price = 0
		wishItems.each{
			price += it.price
		}
		return price
	}
	
//	public String toString() {
//		return "${name}";
//	}
}
